package com.bjwl.web.contrlller.admin;

import com.bjwl.pojo.Daily;
import com.bjwl.service.DailyService;
import com.bjwl.utils.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: dzx
 * @Date:Create：in 2020/4/19 21:59
 * @Description:
 * @Modified By：
 * @Version: 1.0
 */
@Controller
@RequestMapping("/admin/daily")
public class AdminDailyController {

    @Autowired
    private DailyService dailyService;

    @RequestMapping("/showDaily")
    public String showDaily(Integer pageNum, String content, Model model){
        if(pageNum == null){
            pageNum = 1;
        }
        PageBean<Daily> pageBean = dailyService.showDaily(pageNum,content);
        model.addAttribute("pageBean",pageBean);
        return "main_oa/log-list";
    }


}
